Make gtk_window_resize work again
authorMatthias Clasen <mclasen@redhat.com>
Sat, 11 May 2013 23:44:57 +0000 (19:44 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 11 May 2013 23:44:57 +0000 (19:44 -0400)
This hunk of code was lost by accident in the previous commit.

gtk/gtkwindow.c

index e0d650365a9dfef32d1dfb23c3c026199cfedb20..710497fd8a8764438acf138f5b4ea770d3e269ec 100644 (file)
@@ -7897,6 +7897,20 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
       gtk_window_get_remembered_size (window, width, height);
     }
 
+  /* Override any size with gtk_window_resize() values */
+  if (info)
+    {
+      if (info->resize_width > 0)
+       *width = info->resize_width;
+      if (info->resize_height > 0)
+       *height = info->resize_height;
+
+      if (info->resize_is_geometry)
+       geometry_size_to_pixels (geometry, flags,
+                                info->resize_width > 0 ? width : NULL,
+                                info->resize_height > 0 ? height : NULL);
+    }
+
   /* Don't ever request zero width or height, it's not supported by
      gdk. The size allocation code will round it to 1 anyway but if
      we do it then the value returned from this function will is